import { lazy } from "react";
let routes = [
    {
        path: '/layout',
        component: lazy(() => import('../pages/layout')),
        meta:{},
        children: [
            {
                path: '/layout/home',
                component: lazy(() => import('../pages/home')),//路由懒加载
                meta: { title: '首页', icon: 'icon-qiepian' },               
            },
            {
                path: '/layout/list',
                component: lazy(() => import('../pages/list')),
                meta: { title: '点单', icon: 'shoujitianchong' }
            },
            {
                path: '/layout/baihuo',
                component: lazy(() => import('../pages/baihuo')),
                meta: { title: '百货', icon: 'icon-fenlei' }
            },
            {
                path: '/layout/car',
                component: lazy(() => import('../pages/car')),
                meta: { title: '订单', icon: 'gouwuchekong',isAuth:true}
            },
            {
                path: '/layout/my',
                component: lazy(() => import('../pages/my')),
                meta: { title: '我的', icon: 'icon-my' },
                children: []
            }
        ]
    },{
        path:'/login',
        component: lazy(() => import('../pages/login')),
        meta:{
            title:'登录'
        }
    }
]

export default routes